docs: Add uv guide - #932
Conversation
Add a new guide on managing Actor projects with the uv package manager, covering project setup, local development with the Apify CLI, the uv-based Dockerfile, deployment, and dependency management.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #932 +/- ##
==========================================
+ Coverage 86.94% 86.98% +0.03%
==========================================
Files 48 48
Lines 2942 2943 +1
==========================================
+ Hits 2558 2560 +2
+ Misses 384 383 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…n uv guide The scaffolding section referenced a Dockerfile that is only created later in the guide, which was confusing without a pointer. The local run example also used the optional --purge flag, which is not needed for the tutorial flow.
"Use uv" was too terse - unlike the scraping-library guides, the tool name alone does not convey the guide's purpose. The new title mirrors the guide's intro sentence and the verb-first sidebar convention.
The guide pointed readers to a python-uv template that isn't published. An info banner now explains templates are pip-only for now and links the tracking issue apify/actor-templates#350.
szaganek
left a comment
There was a problem hiding this comment.
Quite a few styling suggestions, I'd also delete some fluff, use more procedures for readability.
If you could please try not use hyphens/en dashes so much but create shorter sentences instead, that would be amazing. I think most of my comments were about that 😅
Thanks. I'll update it, and I'll try to update all other doc PRs in this regard as well (the styling, dashes, shorter sentences). |
Adds a `python-uv` Actor template - Actors built and run with [uv](https://docs.astral.sh/uv/). **Template** - `pyproject.toml` + committed `uv.lock` and `.python-version`. Identical versions locally and in the platform build. - uv-based Dockerfile: uv from its official image, `uv sync --locked --no-dev` in a cached layer. - Same single-page scraper as `python-start`, so only the project management differs. - uv-aware `.gitignore` / `.dockerignore`: keep `uv.lock`, never ship `.venv`. **Infrastructure** - `test/templates.test.js`: `checkPythonTemplate` dispatches on `uv.lock`. uv templates install via `uv sync --upgrade`. pip flow unchanged. - `test_python_templates.yaml`: added `astral-sh/setup-uv`, no Python input, so `.python-version` stays authoritative. **Verified** - Jest template test passes for `python-uv`. `python-empty` passes as a pip control. - Docker image builds and runs end to end. **Related PRs** - apify/apify-sdk-python#932 - add "Use uv" docs guide - apify/apify-cli#1274 - add support for uv - #800 - add the uv Actor template - apify/apify-core#30006 - add uv icon to console - apify/apify-web#6452 - add uv icon to web
Description
Adds a "Manage your project with uv" guide covering the whole Actor lifecycle with the uv package and project manager: creating a project, the Actor scaffolding, running locally, installing the locked dependencies in the Dockerfile, deploying, and day-to-day dependency management.
docs/03_guides/10_uv.mdx— the guide.docs/03_guides/code/uv_project/— the backing example project, covered by the repo lint and type checks.The documented flow was verified end to end (local
apify run+ a real Docker build/run). Since the Actor templates are pip-only for now, the guide carries an info banner pointing to apify/actor-templates#350. Companion template PR: apify/actor-templates#800.TODO before merging
docs/03_guides/10_uv.mdx+docs/03_guides/code/uv_project/) intowebsite/versioned_docs/version-3.4/so it also shows in the current docs version, not only under "next".